unit Aux_PosPedCarga;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, Grids, DBGrids, ExtCtrls, Db, RxMemDS;

type
  TFrmAux_PosPedCarga = class(TForm)
    md: TRxMemoryData;
    ds: TDataSource;
    Panel1: TPanel;
    DBGrid1: TDBGrid;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    mdCod_Ref: TStringField;
    mdNome: TStringField;
    mdDesc_Parc: TStringField;
    mdEstoque: TFloatField;
    mdCarga: TFloatField;
    mdProducao: TFloatField;
    mdSaldo: TFloatField;
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure DBGrid1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    Ger_ok: boolean;
  end;

var
  FrmAux_PosPedCarga: TFrmAux_PosPedCarga;

implementation

{$R *.DFM}

procedure TFrmAux_PosPedCarga.BitBtn2Click(Sender: TObject);
begin
 close;
end;

procedure TFrmAux_PosPedCarga.BitBtn1Click(Sender: TObject);
begin
 Ger_ok:= true;
 close;
end;

procedure TFrmAux_PosPedCarga.FormActivate(Sender: TObject);
begin
 Ger_ok:= false;
end;

procedure TFrmAux_PosPedCarga.DBGrid1KeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
 if ds.state in [dsinsert] then md.cancel;
end;

end.
